# eric7.Project.AddDirectoryDialog

Module implementing a dialog to add files of a directory to the project.

### Global Attributes

None

### Classes

AddDirectoryDialog | Class implementing a dialog to add files of a directory to the project.

### Functions

None

## AddDirectoryDialog

Class implementing a dialog to add files of a directory to the project.

### Derived from

QDialog, Ui_AddDirectoryDialog

### Class Attributes

None

### Class Methods

None

### Methods

AddDirectoryDialog | Constructor
getData | Public slot to retrieve the dialogs data.
on_filterComboBox_currentIndexChanged | Private slot to handle the selection of a file type.
on_sourceDirPicker_textChanged | Private slot to handle the source directory text changed.

### Static Methods

None

#### AddDirectoryDialog (Constructor)

AddDirectoryDialog(pro, fileTypeFilter="SOURCES", parent=None, name=None, startdir=None)

Constructor

pro (Project)
  reference to the project object
fileTypeFilter (str)
  file type filter
parent (QWidget)
  parent widget of this dialog
name (str)
  name of this dialog
startdir (str)
  start directory for the selection dialog

#### AddDirectoryDialog.getData

getData()

Public slot to retrieve the dialogs data.

Return:
  tuple of four values giving the selected file type, the source and target directory and a flag indicating a recursive add

Return Type:
  tuple of (str, str, str, bool)

#### AddDirectoryDialog.on_filterComboBox_currentIndexChanged

on_filterComboBox_currentIndexChanged(index)

Private slot to handle the selection of a file type.

index (int)
  index of the selected entry

#### AddDirectoryDialog.on_sourceDirPicker_textChanged

on_sourceDirPicker_textChanged(directory)

Private slot to handle the source directory text changed.

If the entered source directory is a subdirectory of the current projects main directory, the target directory path is synchronized. It is assumed, that the user wants to add a bunch of files to the project in place.

directory (str)
  the text of the source directory line edit

Up